package com.hzm.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 课程
 * </p>
 *

 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "EduCourse对象", description = "课程")
@TableName("edu_course")
public class Course extends com.qy137.entity.Course implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "课程ID")
    private String id;

    @ApiModelProperty(value = "课程讲师ID")
    @TableField("teacher_id")
    private String teacherId;

    @ApiModelProperty(value = "课程专业ID")
    @TableField("subject_id")
    private String subjectId;

    @ApiModelProperty(value = "课程专业父级ID")
    @TableField("subject_parent_id")
    private String subjectParentId;

    @ApiModelProperty(value = "课程标题")
    private String title;

    @ApiModelProperty(value = "课程销售价格，设置为0则可免费观看")
    private BigDecimal price;

    @ApiModelProperty(value = "总课时")
    @TableField("lesson_num")
    private Integer lessonNum;

    @ApiModelProperty(value = "课程封面图片路径")
    private String cover;

    @ApiModelProperty(value = "销售数量")
    @TableField("buy_count")
    private Long buyCount;

    @ApiModelProperty(value = "浏览数量")
    @TableField("view_count")
    private Long viewCount;

    @ApiModelProperty(value = "乐观锁")
    private Long version;

    @ApiModelProperty(value = "课程状态 Draft未发布  Normal已发布")
    private String status;

    @ApiModelProperty(value = "逻辑删除 1（true）已删除， 0（false）未删除")
    @TableField("is_deleted")
    private Integer isDeleted;

    @ApiModelProperty(value = "创建时间")
    @TableField("gmt_create")
    private LocalDateTime gmtCreate;

    @ApiModelProperty(value = "更新时间")
    @TableField("gmt_modified")
    private LocalDateTime gmtModified;
    @ApiModelProperty(value = "课程ID")
    @TableField(exist = false)
    private String courseId;

    //    讲师表
    @ApiModelProperty(value = "讲师姓名")
    @TableField(exist = false)
    private String name;

    @ApiModelProperty(value = "讲师简介")
    @TableField(exist = false)
    private String intro;

    @ApiModelProperty(value = "讲师头像")
    @TableField(exist = false)
    private String avatar;

    //    课程表
    @ApiModelProperty(value = "课程简介")
    @TableField(exist = false)
    private String description;

    ////    课程大纲表
    @ApiModelProperty(value = "节点名称")
    @TableField(value = "title", exist = false)
    private String teacherTitle;

    @ApiModelProperty(value = "源文件名称")
    @TableField(exist = false)
    private String video_original_name;

    @ApiModelProperty(value = "是否免费")
    @TableField(exist = false)
    private Boolean is_free;


    @ApiModelProperty(value = "视频时长（秒）")
    @TableField(exist = false)
    private Float duration;
    //
//    //    章节表
    @ApiModelProperty(value = "章节")
    @TableField(value = "title", exist = false)
    private String chapter_title;

    @ApiModelProperty(value = "章节信息表")
    @TableField(exist = false)
    private List<Chapter> chapter;

    @ApiModelProperty(value = "课时信息表")
    @TableField(exist = false)
    private List<Video> video;

    //    视频资源
    @ApiModelProperty(value = "课时信息表")
    @TableField(exist = false)
    private String videoSourceId;
    //    手机号
    @ApiModelProperty(value = "课时信息表")
    @TableField(exist = false)
    private String mobile;
    //  会员类型
    @ApiModelProperty(value = "课时信息表")
    @TableField(exist = false)
    private String isType;
}